function delay(interval){
    return new Promise(function(resolve){
        return setTimeout(() => resolve({a:3}), interval);
    });
}

function logDone(x){
    console.log('Done:',x);
}

delay(1000)
    .then((x)=>logDone(x));